<template>
	<view>
		<view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30"  @click="login">
			<view class="u-flex" @click="profile">
				<view class="u-m-r-20">
					<u-avatar :src="pic" size="120"></u-avatar>
				</view>
				<view class="u-flex-1">
					<view class="u-font-18 login">立即登录/注册</view>
				</view>
			</view>
		</view>
		<view class="wrap">
			<view class="header-summary">
			   <view class="body">
				   <view class="item" @click="login">
					   <image :src="cover1" mode="widthFix" class="img"></image>
					   <text>优惠卷</text>
				   </view>
				   <view class="divider"></view>
				   <view class="item" @click="login">
					   <image :src="cover2" mode="widthFix" class="img"></image>
					   <text>我的地址</text>
				   </view>
			   </view>
			</view>
			
			<view class="list">
				<view class="item" @click="login">
					<view class="left">
						<image :src="wallet_icon" mode="widthFix" class="img"></image>
						<text>我的钱包</text>
					</view>
					<view class="right">
						<u-icon name="arrow-right"></u-icon>
					</view>
				</view>
				<view class="item" @click="login">
					<view class="left">
						<image :src="mine_safe_icon" mode="widthFix" class="img"></image>
						<text>安全中心</text>
					</view>
					<view class="right">
						<u-icon name="arrow-right"></u-icon>
					</view>
				</view>
				<view class="item" @click="login">
					<view class="left">
						<image :src="mine_opinion_icon" mode="widthFix" class="img"></image>
						<text>意见反馈</text>
					</view>
					<view class="right">
						<u-icon name="arrow-right"></u-icon>
					</view>
				</view>
				<view class="item" @click="login">
					<view class="left">
						<image :src="mine_phone_icon" mode="widthFix" class="img"></image>
						<text>联系客服</text>
					</view>
					<view class="right">
						<u-icon name="arrow-right"></u-icon>
					</view>
				</view>
				<view class="item" @click="login">
					<view class="left">
						<image :src="mine_setting_icon" mode="widthFix" class="img"></image>
						<text>设置</text>
					</view>
					<view class="right">
						<u-icon name="arrow-right"></u-icon>
					</view>
				</view>
			</view>
			<view class="list" style="margin-top: 10px;">
				<view class="item" @click="login">
					<view class="left">
						<image :src="mine_shifu_icon" mode="widthFix" class="img"></image>
						<text>我是师傅</text>
					</view>
					<view class="right">
						<text class="text">查看如何入驻</text>
						<u-icon name="arrow-right"></u-icon>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import config from "@/common/config.js" // 全局配置文件
	export default {
		data() {
			return {
				pic:"config.baseUrl+uni.getStorageSync('lifeData').vuex_user.avatar",
				cover1:'/static/img/my/cover/mine_coupon_icon.png',
				cover2:'/static/img/my/cover/mine_address_icon.png',
				wallet_icon:'/static/img/my/icon/wallet_icon.png',
				mine_safe_icon:'/static/img/my/icon/mine_safe_icon.png',
				mine_opinion_icon:'/static/img/my/icon/mine_opinion_icon.png',
				mine_phone_icon:'/static/img/my/icon/mine_phone_icon.png',
				mine_setting_icon:'/static/img/my/icon/mine_setting_icon.png',
				mine_shifu_icon:'/static/img/my/icon/mine_shifu_icon.png',
				bgImage:'/static/img/my/cover/my-bg.png',
			}
		},
		onLoad() {
			
		},
		onShow(){
		},
		methods: {
			login(){
				this.$u.route('/pages/login/login')
			},
		}
	}
</script>

<style lang="scss">
.user-box{
	background-color: #0ab0ed;
	height: 440rpx;
	border-radius: 8rpx;
	.login{
		background-color: rgba(#555,0.5);
		padding: 15rpx 28rpx;
		border-radius: 130rpx;
		color: #fff;
		margin-left: 50rpx;
	}
}

.wrap{
	padding: 0 40rpx;
	.header-summary {
	  height: 100px;
	  margin: -50px auto 0;
	  overflow: hidden;
	  position: relative;
	  z-index: 100;
	  border-radius: 8px;
	  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
	  background-color: #fff;
	  .body{
		  margin: 0 20rpx;
		  height: 220rpx;
		  display: flex;
		  align-items: center;
		  .item{
			  flex: 1;
			  display: flex;
			  justify-content: space-around;
			  align-items: center;
			  flex-direction: column;
			  .img{
				  width: 60rpx;
				  margin-bottom: 10rpx;
			  }
		  }
		  .divider{
			  display: block;
			  width: 1px;
			  height: 60%;
			  background-color: #f3f4f6;
		  }
	  }
	}
	.list{
		margin-top: 20px;
		padding: 10px;
		background-color: #fff;
		border-radius: 8rpx;
		.item{
			padding: 20rpx 0 ;
			display: flex;
			align-items: center;
			justify-content: space-between;
			.left{
				display: flex;
				align-items: center;
				font-size: 16px;
				.img{
					width: 40rpx;
					margin-right: 20rpx;
				}
			}
			.right{
				color: #909399  ;
				.text{
					margin-right: 10rpx;
				}
			}
		}
	}
}

</style>